<div id=admin>
<h1>Editer une salle</h1>
<?php $row = $query_room->row();
function stringToBoolean($str){
if ($str == 'true') return TRUE;
else return FALSE;
};?>
<p>Coordoonées (<?php echo $row->position_x.",".$row->position_y;?>)</p>

<?php
echo form_open_multipart('rooms/confirm_changes','',array('id' => $row->id, 'position_x'=> $row->position_x, 'position_y'=> $row->position_y, 'expo_id' => $row->expo_id));?>
<label >Nom </label><?php echo form_input(array('name' => 'name', 'value' => $row->name));?><br/><br/>
<label>Image</label><img src="/uploads/<?php echo $row->image; ?>" name='photo' height="100"/>
	<?php echo anchor_popup('upload/do_upload','Modifier l\'image','upload');
	?>
	<?php echo form_input(array('value'=> $row->image ,'name'=>'upload', 'id'=>'upload', 'style'=>'display:none'));?>
<br /><br />

<label>Salle privée </label> Oui <?php echo form_radio(array('name'=> 'is_private', 'value' => 'true', 'checked' => stringToBoolean($row->is_private)));?> Non<?php echo form_radio(array('name'=> 'is_private', 'value' =>'false', 'checked' => !stringToBoolean($row->is_private)));?><br/><br/>

<?php echo form_submit('','Enregistrer');?>
<?php echo form_close();?>

</div>